1. Field of the Invention
The present invention relates to a data storage system, a data relocation method and a recording medium recording programs for executing the method, and more particularly to a technique for determining timing at which data stored in a storage unit is relocated, on the basis of the estimated load condition and/or current load condition.
2. Description of the Related Art
Continuous data, which meaningfully forms a file, may be scattered and stored in a data storage unit such as a magnetic disk unit, etc., on account of various factors in a data storage process. If continuous data is thus scattered and stored in the data storage unit, the problem arises that access efficiency when accessing the continuous data becomes poor.
In order to overcome the above problem, Unexamined Japanese Patent Application KOKAI Publication No. H7-200369 discloses a file system, which secures a blank storage area in order to relocate already-stored data not to be stored after being scattered and store continuous data in continuous areas. This Patent Application also discloses a method for securing continuous blank areas necessary in an operation for transferring a minimum-required file.
However, the above Patent Application does not disclose a method regarding timing at which data is relocated. Thus, in a case where to perform a process of data relocation when a processing load on the system is large, such as a case where to record and reproduce data by means of the method described in the Patent Application, a delay in a process for storing and reproducing data in a data storage device may possibly occur.
Particularly, in a case where to relocate a large volume of data, such as image data, etc. or to simultaneously process plural pieces of data, a delay in the data storage and reproduction process is likely to occur. In a case where to relocate a large volume of data into completely continuous areas, the number of read/write data pieces becomes extremely large. Therefore, the method described in the Patent Application entails a problem that the processing time necessary for data relocation is quite long.
In order to avoid such problems, it is suggested to relocate data when a load on the system is small. However, conventionally, an operator has to make sure whether the load on the system is small and instruct a process of data relocation when determined that the load on the system is small, resulting in so many tasks for the operator.
An object of the present invention is to provide a data storage system, a data relocation method and a computer readable recording medium, which records programs for realizing the data storage system, all of which perform a process of data relocation with efficiency, by determining timing at which data is relocated based on a condition of the estimated load and/or the current load of the system.
In order to achieve the above object, according to the first aspect of the present invention, there is provided a data storage system comprising:
a data storage unit which has a data storage area divided into a plurality of blocks and which stores data in the data storage area in unit of blocks;
a main memory unit which has a program area and a data area; and
a processing unit which executes programs stored in the main memory unit, wherein the main memory unit
stores, in the data area, location information which represents in which block the data is located and stored in the data storage area of the data storage unit, and
stores, in the program area, a relocation program for relocating the data stored in each block of the data storage area in the data storage unit by referring to the location information which is stored in the data area, a load condition output program for outputting a load condition signal indicating a load on a system resource including the data storage unit and a control program for controlling whether to execute the relocation program in accordance with the output load condition signal, and
the processing unit
monitors the load condition signal which is output when executing the load condition signal output program, by executing the control program stored in the program area, and
executes the relocation program which is stored in the program area, based on a monitored result of the load condition signal.
In the above-described data storage system, a process for relocating the data stored in the data storage unit is executed in accordance with the load condition signal which indicates a load on a predetermined system resource. Therefore, in a time slot in which the load condition signal being monitored by the execution of the control program indicates that the load on the system resource is relatively small, the relocation program is executed so that the data stored in each block of the data storage unit can be relocated. As a result of the above, the data can be relocated with efficiency.
Different processing units may be prepared for respectively executing the control program, the load condition signal output program and the relocation program. In this case, an instruction for executing the load condition signal or the relocation program is transmitted as a message between the processing units. The main memory unit may be arranged in each processing unit. The system may include a plurality of processing units or main memory units, without departing from the scope of the present invention.
In the data storage system according to the first aspect of the invention,
the data storage unit may include an area for storing location information indicating in which block the data in the data storage area is located and stored. In this case,
the control program is one for transferring the location information stored in the data storage unit into the data area of the main memory unit, when executing the relocation program.
In the data storage system according to the first aspect of the invention, the main memory unit further stores operational setting requirements of the system in the data area. In this case,
the control program includes an operational setting requirement determination program for determining whether a operating condition of the system meets a stored operational setting requirement, and controls execution of the relocation program in accordance with a determined result processed by the operational setting requirement determination program.
In this case, if a time slot in which a noise may possibly annoy people is set as an operational setting requirement in order to restrict the data relocation program to perform the data relocation, for example, the data can be relocated at timing at which a load on the system resource is low, while taking effects on the environment into consideration.
The data storage system according to the first aspect of the invention may further comprise a relocation program storage unit which stores a plurality of relocation programs. In this case,.
the control program includes a relocation program selection program for selecting either one of relocation programs stored in the relocation program storage unit, when performing data relocation, and for starting the relocation program which has been selected by the relocation program selection program.
The relocation program storage unit may be realized by one or more than one data storage area included in the data storage unit.
The relocation program selection program may be used for selecting either one of relocation programs from the relocation program storage unit, in accordance with the location information store in the data area.
The relocation program selection program may be used for selecting either one of relocation programs from the relocation program storage unit, in accordance with the output load condition signal.
For example, in a case where the load on the system resource is relatively small so that the data relocation process can be performed for a long time, the data stored in the data storage unit can be relocated in such a way that identical data are located in continuous block of the data storage area. In such a case, the speed at which the following data is read out can be accelerated. On the other hand, in a case where the time for the data relocation process is relatively short, for example, the data can be relocated in such a way that the data corresponding to 6 blocks are scattered in two parts, respectively and continuously in the unit of 3 blocks.
In the data storage system according to the first aspect of the invention,
the load condition signal output program includes a load condition monitoring program for monitoring a current load condition on a system resource, and is used for outputting a load condition signal in accordance with the load condition monitored by executing the load condition monitoring program.
Accordingly, when the load on the system resource is high, the data relocation program is not executed, and when the load on the system resource is low, the processing unit is controlled to relocate the data and the load condition signal is output.
In the data storage system according to the first aspect of the invention,
the load condition signal output program includes a load condition monitoring program for monitoring the load condition on the system resource and a load condition learning program for learning the load condition monitored by execution of the load condition monitoring program and for storing the learned result as load condition estimation, and outputs a load condition signal in accordance with the load condition estimation stored by estimation of the load condition program.
By thus learning the load condition and storing the learned data as load condition estimation, the load condition signal can be output in order not to execute the data relocation program, in a case where it is estimated that the load on the system is to be high based on usage conditions representing general usage times of the system by the user.
In the data storage system according to the first aspect of the invention,
the processing unit may execute a program in accordance with a priority order of a task. In this case,
it is preferred that a priority order of a task regarding execution of the control program is set equal to or lower than a priority order of any other processes.
In this case, when the load on the system resource such as the processing unit or the like is high, almost no system resource is allocated to a task which is carried out by the control program whose priority order is low. Thus, execution of any other tasks which are executed in a higher priority order can not be interrupted by the execution of the control program. In a time slot in which the load on the system resource is high, it is not necessary to relocate the data stored in the data storage unit. That is, there is no need for the processing unit to execute the control program, therefore, no troubles may be considered.
The data storage system according to the first aspect of the invention may comprise a plurality of data storage units each of which stores data in the data storage area in the unit of blocks and each of which has a data storage area divided into a plurality of blocks. In this case,
the main memory units stores, in the data area, location information regarding each of the plurality of data storage units.
The plurality of data storage units may be identical or may differ from each other.
The relocation program may relocate data which is stored in each of the blocks of the data storage area in the unit of respective data storage units.
The relocation program may relocate the data stored in each block of the data storage area in the unit of a group of two data storage units.
In this case, it is preferred that the relocation program may relocate continuous data in such a way that the data is stored over two or more than two data storage units.
In order to achieve the above-described object, according to the second aspect of the present invention, there is provided a data storage system comprising:
data storage means, including a data storage area divided into a plurality of blocks, for storing data in the data storage area in unit of blocks;
location information storage means for storing location information representing in which block the data is located and stored in the data storage area of the data storage means;
data relocation means for relocating the data stored in each block of the data storage area of the data storage means by referring to the location information stored in the relocation information storage means;
load condition signal outputting means for outputting a load condition signal which indicates a load on a predetermined system resource including the data storage means; and
control means for controlling the data relocation means in accordance with the load condition signal output from the load condition signal outputting means.
The data storage system according to the second aspect of the invention further comprises:
operational setting requirement storage means for storing an operational setting requirement of the system comprising each of the means; and
operational setting requirement determination means for determining whether a operating condition of the system meets an operational setting requirement stored in the operational setting requirement storage means. In this case,
the control means may control the data relocation means in accordance with a determined result processed by the operational setting requirement determination means.
The data storage system according to the second aspect of the invention may further comprise:
relocation method storage means for storing a plurality of data relocation methods capable of relocating data by the data relocation means; and
relocation method selection means for selecting and transmitting either one of relocation methods from the relocation method storage means to the data relocation means. In this case,
the data relocation means relocates data in accordance with the relocation method which has been transmitted from the relocation method selection means.
In order to achieve the above-described object, according to the third aspect of the invention, there is provided a data relocation method for relocating data stored in a data storage unit including a data storage area divided into a plurality of blocks, in accordance with location information indicating a location of the data in the data storage area, wherein the method
monitors a load condition signal indicating a load on a predetermined system resource including the data storage unit, and
relocates data which is stored in each block of the data storage area of the data storage unit, in accordance with a monitored result of the load condition signal, by referring to the location information.
In order to achieve the above-described object, according to the fourth aspect of the invention, there is provided a computer readable recording medium which records programs for relocating data which is stored in a data storage unit including a data storage area divided into a plurality of blocks, in accordance with location information indicating a location of the data in the data storage area, the programs realizing on a computer:
a load condition signal monitoring function for monitoring a load condition signal which indicates a load on a predetermined system resource including the data storage unit; and
a data relocation function for referring the location information and for relocating the data stored in each block of the data storage area of the data storage unit, in accordance with a monitored result of the load condition signal which is processed by the load condition signal monitoring function.
In order to achieve the above-described object, according to the fifth aspect of the invention, there is provided a program embodied in a carrier wave, for relocating data stored in a data storage unit including a data storage area divided into a plurality of blocks in accordance with location information which indicates a location of the data in the data storage area, the program realizing on a computer a load condition signal monitoring function for monitoring a load condition signal which indicates a load on a predetermined system resource including the data storage unit; and
a data relocation function for referring to the location information and relocating the data stored in each block of the data storage area of the data storage unit, in accordance with a monitored result of the load condition signal which is processed by the load condition signal monitoring function.